/*
 *
 *      Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: lengleng (wangiegie@gmail.com)
 *
 */

package com.sicong.admin.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 日志表
 * </p>
 *
 * @author chenww
 * @since 2020-12-22
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_log")
@ApiModel(value="Log对象", description="")
public class Log implements Serializable {

	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.AUTO)
	@ApiModelProperty(value = "日志id")
	private Long id;

	@ApiModelProperty(value = "日志类型")
	private String type;

	@ApiModelProperty(value = "日志标题")
	private String title;

	@ApiModelProperty(value = "应用标识")
	private String serviceId;

	@ApiModelProperty(value = "创建人")
	private String createBy;

	@ApiModelProperty(value = "操作ip地址")
	private String remoteAddr;

	@ApiModelProperty(value = "用户代理")
	private String userAgent;

	@ApiModelProperty(value = "请求uri")
	private String requestUri;

	@ApiModelProperty(value = "操作方式")
	private String method;

	@ApiModelProperty(value = "提交数据")
	private String params;

	@ApiModelProperty(value = "方法执行时间")
	private Long time;

	@ApiModelProperty(value = "异常信息")
	private String exception;

	@TableLogic
	@ApiModelProperty(value = "删除标记,1:已删除,0:正常")
	private String deleted;

	@ApiModelProperty(value = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private Date gmtCreate;

	@ApiModelProperty(value = "更新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date gmtModified;

}
